package com.fanyue.modules.wzb.controller.admin;

import cn.hutool.json.JSONObject;
import com.fanyue.core.annotation.CoolRestController;
import com.fanyue.core.base.BaseController;
import com.fanyue.core.request.R;
import com.fanyue.modules.wzb.entity.CargoEntity;
import com.fanyue.modules.wzb.service.CargoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestAttribute;

/**
 * 货位信息
 */
@Tag(name = "货位信息", description = "货位信息")
@CoolRestController(api = { "add", "delete", "update", "page", "list", "info" })
public class CargoController extends BaseController<CargoService, CargoEntity> {

    @Override
    protected void init(HttpServletRequest request, JSONObject requestParams) {
    }

    //批量新增
    @Operation(summary = "批量新增")
    @PostMapping("/addBatch")
    public R addBatch(@RequestAttribute JSONObject requestParams) {
        return service.addByBatch(requestParams);
    }


}